load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "errorutil",
    srcs = [
        "catch.go",
        "error.go",
        "sentinel.go",
        "tenant.go",
        "tenant_deprecated_wrapper.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/util/errorutil",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/util/errorutil/unimplemented",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "errorutil_test",
    size = "small",
    srcs = ["error_test.go"],
    embed = [":errorutil"],
)
